<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/aui.css" />
    <link rel="stylesheet" type="text/css" href="../css/style.css"/>
    <style>
        .mike-txt-title {
            background: linear-gradient(to right, red, blue);
            -webkit-background-clip: text;
            color: transparent;
        }
        .aui-navBar {
            height: 85px;
        }
    </style>
</head>
<body>


<header class="aui-navBar aui-navBar-fixed"  id="aui-header">
    <a tapmode onclick="closeWin('back')" class="aui-navBar-item">
        <i class="icon icon-back"></i>
    </a>
    <div class="aui-center">
        <span class="aui-center-title mike-txt-title" id="title2" ></span>
    </div>

    <a class="aui-navBar-item" style="color: black;float: left" tapmode onclick="closeWin('index')">
        <i class="icon"></i>首页
    </a>

</header>


</body>
<script type="text/javascript" src="../script/api.js" ></script>
<script type="text/javascript">
    apiready = function(){
      api.parseTapmode();
      var header = $api.byId('aui-header');
      $api.fixStatusBar(header);
      var headerPos = $api.offset(header);
      var body_h = $api.offset($api.dom('body')).h;
      var browser = api.require('webBrowser');
      browser.openView({
          url: api.pageParam.url,
          rect: {
              x: 0,
              y: headerPos.h,
              w: 'auto',
              h: 'auto'
          }
      }, function(ret, err) {
          switch (ret.state) {
              case 0:
                  break;
              case 1:
                  break;
              case 2:
                  break;
              case 3:
              var title = $api.byId('title');
              title.innerHTML = '<i class="iconfont icon-svip"></i>'+ret.title;
                  break;
              case 4:
                  break;
              default:
                  break;
          }
      });

        api.addEventListener({
            name: 'keyback'
        }, function (ret, err) {
            closeWin();
        });
    }

    function closeWin(type){
        if(type=='back'){
            var browser = api.require('webBrowser');
            browser.historyBack(
                function(ret, err) {
                    if (!ret.status) {
                        api.closeWin();
                    }
                }
            );
        }else{
            api.closeWin();
        }
    }

    function closeWd(){
      api.closeWin();
    }
</script>
</html>
